package com.hbx.exception;

import com.hbx.constant.RspEnum;

/*
 * @Author:hbx
 * 
 * 资源共享平台自定义异常
 * */
public class RspException extends RuntimeException{

    private Integer code;

    public RspException() {
        super();
    }

    public RspException(String message) {
        super(message);
    }

    public RspException(Integer code,String message) {
        super(message);
        this.code = code;
    }

    public RspException(RspEnum rspEnum) {
        super(rspEnum.getMsg());
        this.code = rspEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
